package com.shop.product.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.shop.framework.util.Logger;
import com.shop.product.service.ProductCommentService;
import com.shop.product.vo.ProductVO;

/**
 * request = /rest/CATEGORY/
 * @author geryon
 *
 */
@Controller
@RequestMapping("/PRODUCT/comment")
public class ProductCommentController {

	private final static int LIST_ROW_CNT = 20; // 게시물 리스트 갯수
	
	@Autowired
	private ProductCommentService service;

	/**
	 * 카테고리 관리 페이지
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, value="/")
	public String requestScreen(Model model) {
		Logger.getLogger().debug("여기 탐");
		return "admin/admin_category";
	}

	/**
	 * 카테고리 등록
	 * @param model
	 * @param member
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, value="/add")
	public Model addCategory(Model model,
							@RequestBody ProductVO.ProductComment categoryItem) {
		
		return model;
	}
	
	/**
	 * 카테고리 조회
	 * @param model
	 * @return
	 */
	@RequestMapping (method = RequestMethod.GET, value="/list")
	public Model listCategory(Model model) {
		
		return model;
	}
}
